<?xml version="1.0" encoding="utf-8" ?>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<jsp:include page="/commonPart/htmlHeader2.jsp">
	<jsp:param name="title" value="博客草稿-${userInfo.name}的个人空间-CommonWorld" />
</jsp:include>
<body>
<div id = "CW_Screen" >
	<jsp:include page= "/commonPart/bodyHeader2.jsp" ></jsp:include>
	<div id = "CW_Content">
		<div id = "SpaceLeft">
			<div class = "AdminNav clearfix">
				<a href = "${userUrls.home}" class = "u" title = "返回我的空间首页">
					<img src = "${initParam.webContentPath}${userInfo.headImage}" alt = "${userInfo.name}" class = "SmallPortrait" user = "1" />	
				</a>
				<span class = "h">空间管理</span>
			</div>
			<div id = "AdminMenus" class = "Mod">
				<ul>
					<li class = "caption">
						<strong>个人信息管理</strong>
						<ol>
							<li><a href = "${userUrls.adminInbox}">站内留言</a></li>
							<li><a href = "${userUrls.adminProfile}">修改个人资料</a></li>
							<li><a href = "${userUrls.adminChqwd}">更改登录密码</a></li>
							<li><a href = "${userUrls.adminPortrait}">更改头像图片</a></li>
						</ol>
					</li>
				</ul>
				<ul>
					<li class = "caption">
						<strong>博客管理</strong>
						<ol>
							<li><a href = "${userUrls.adminNewBlog}">发表博客</a></li>
							<li class = "active"><a href = "${userUrls.adminDrafts}">草稿箱(${draftInfos.count})</a></li>
							<li><a href = "${userUrls.adminBlogCatalogs}">博客设置/分类管理</a></li>
						</ol>
					</li>
				</ul>
			</div>
		</div>
		<div class = "SpaceList" id = "AdminBody">
			<div class = "TopBar">
				<div class = "NavPath">
				</div>
			</div>
			<div class = "AdminHead">
				<div class = "RelativeLinks">
					<a class = "rndbutton" href = "${userUrls.blog}"><span>我的博客</span></a>
				</div>
				<h1>
					博客草稿
					<span class = "SubTitle">共有${draftInfos.count}篇文章</span>
				</h1>
			</div>
			<div class = "AdminContent Drafts">
				<ul>
					<c:forEach items= "${drafts}" var= "draft">
						<li id = "draft_${draft.blogId}">
							<h2>
								<span class = "opts">
									<a href = "javascript:delete_draft(${draft.blogId})">删除</a> |
									<a href = "${userUrls.adminEditBlog}?draft=${draft.blogId}">继续编辑</a>
								</span>
								<a class = "title" href = "${userUrls.adminEditBlog}?draft=${draft.blogId}">${draft.title}</a>
							</h2>
							<p></p>
						</li>
					</c:forEach>
				</ul>
			</div>
			<script>
				function delete_draft(pid) {
					if (!confirm("确定要删除此草稿吗?"))
						return;
					ajax_post("/action/blog/deleteDraft", "draftId="+pid, function(){
						$('#draft_' + pid).fadeOut();
					});
				}
			</script>
		</div>
	</div>
	<div class = "clear"></div>
	<div id = "footer"></div>
</div>
</body>
</html>